package com.cy.controller;

import com.cy.pojo.Tborder;
import com.cy.service.Tborderservice;
import com.cy.util.JsonRueslt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class TborderController {
    @Autowired
    Tborderservice tborderservice;
    @GetMapping("/list")
    public JsonRueslt selet(Tborder tborder){
        return new JsonRueslt(tborderservice.sele(tborder));
    }
    @PostMapping("/insert")
    public JsonRueslt inser(Tborder tborder){
        return new JsonRueslt(tborderservice.ins(tborder));
    }
    @PutMapping("/update")
    public JsonRueslt updat(Tborder tborder){
        return new JsonRueslt(tborderservice.upd(tborder));
    }
    @DeleteMapping("/delete")
    public JsonRueslt delet(Long [] ids){
        return new JsonRueslt(tborderservice.del(ids));
    }
}
